﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'Stored_Procedure_Name')
	BEGIN
		DROP  Procedure  Stored_Procedure_Name
	END

GO

CREATE Procedure Stored_Procedure_Name
(
		@name varchar(255),
	@tabid uniqueidentifier,
	@typid uniqueidentifier
)
AS
BEGIN
	declare @id uniqueidentifier;
	set @id=newid();
	Insert Into [Constraint]
		(CONS_ID,CONS_NAME,TAB_ID,CONS_TYP_ID) values (@id,@name,@tabid,@typid);
		
	select @id;
END


GO

/*
GRANT EXEC ON Stored_Procedure_Name TO PUBLIC

GO
*/

